﻿@model Commission.Models.Customer
@using MyResources = Commission.Resources.AppResource

@{
    ViewBag.Title = "Details";
}

<style type="text/css">
    dt { float: left; width: 100px; padding :4px; text-align:left }
    dd { margin-left: 100px; padding :4px; }
</style>

<h2>@MyResources.LabelCustomerDetail</h2>

<div>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @MyResources.LabelUserName
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserName)
        </dd>

        <dt>
            @MyResources.LabelCustomerName
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Name)
        </dd>

        <dt>
            @MyResources.LabelBirthday
        </dt>

        <dd>
            @Html.DisplayFor(model => model.BirthDay)
        </dd>

        <dt>
            @MyResources.LabelCMND
        </dt>

        <dd>
            @Html.DisplayFor(model => model.IDCard)
        </dd>

        <dt>
            @MyResources.LabelAddress
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Address)
        </dd>

        <dt>
            @MyResources.LabelPhoneNumber
        </dt>

        <dd>
            @Html.DisplayFor(model => model.PhoneNumber)
        </dd>

        <dt>
            @MyResources.LabelAttendantDate
        </dt>

        <dd>
            @Html.DisplayFor(model => model.AttendantDate)
        </dd>

        <dt>
            @MyResources.LabelValidDate
        </dt>

        <dd>
            @Html.DisplayFor(model => model.ValidDate)
        </dd>

        <dt>
            @MyResources.LabelCustomerType
        </dt>

        <dd>
            @Html.DisplayFor(model => model.CustomerType.FullTypeName)
        </dd>

        <dt>
            @MyResources.LabelSponsoredCustomer
        </dt>

        <dd>
            @if (Model.SponsorCustomer != null) { 
                @Html.ActionLink(
                    Model.SponsorCustomer.DisplayName,
                    "Details", "Customer", 
                    new { id = Model.SponsorCustomer.CustomerID }, new { @class = "LabelNormal" })
            }
        </dd>

        <dt>
            @MyResources.LabelParentCustomer
        </dt>

        <dd>
            @if (Model.ParentCustomer != null)
            {
                @Html.ActionLink(
                    Model.ParentCustomer.DisplayName,
                    "Details", "Customer",
                    new { id = Model.ParentCustomer.CustomerID }, new { @class = "LabelNormal" })
            }
        </dd>

    </dl>
</div>
<p>
    @Html.ActionLink(@MyResources.LinkBackToList, "Index")
</p>
